/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Builder;
import lombok.experimental.Tolerate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * ClassName: ChangePriceLog <br/>
 * Function: 菜品变价记录 <br/>
 * date: 2018-11-27 16:05:32 <br/>
 *
 * @author liuwenjin
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="change_price_logs")
public class ChangePriceLog extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;

	// 变价单id 
    @Column(name="change_price_id")
	private Long changePriceId = null;

	// 菜品名称 
    @Column(name="dishes_name", length = 300)
	private String dishesName = null;

	// 规格名称 
    @Column(name="spec_name", length = 300)
	private String specName = null;

	// 原标准价 
    @Column(name="old_price",scale=2)
	private Double oldPrice = null;

	// 变后标准价 
    @Column(name="price",scale=2)
	private Double price = null;

	// 原会员价 
    @Column(name="old_vip_price",scale=2)
	private Double oldVipPrice = null;

	// 变后会员价 
    @Column(name="vip_price",scale=2)
	private Double vipPrice = null;

	// 变价原因 
    @Column(name="reason", length = 300)
	private String reason = null;

	// 生效日期 
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
    @Column(name="effective_time")
	private Date effectiveTime = null;

	// 操作人
    @Column(name="operator_name", length = 300)
	private String operatorName = null;

	// 操作时间 
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
    @Column(name="operate_time")
	private Date operateTime = null;


    @Tolerate
	public ChangePriceLog() {
		
	}
    @Tolerate
	public ChangePriceLog(Long id){
    	super.setId(id);
    }
	
	/**
	 * 获取变价单id
	 */
	public Long getChangePriceId() {
		return this.changePriceId;
	}

    /**
     * 设置变价单id
     */
	public ChangePriceLog setChangePriceId(Long changePriceId) {
		this.changePriceId = changePriceId;
		return this;
	}

	/**
	 * 获取菜品名称
	 */
	public String getDishesName() {
		return this.dishesName;
	}

    /**
     * 设置菜品名称
     */
	public ChangePriceLog setDishesName(String dishesName) {
		this.dishesName = dishesName;
		return this;
	}

	/**
	 * 获取规格名称
	 */
	public String getSpecName() {
		return this.specName;
	}

    /**
     * 设置规格名称
     */
	public ChangePriceLog setSpecName(String specName) {
		this.specName = specName;
		return this;
	}

	/**
	 * 获取原标准价
	 */
	public Double getOldPrice() {
		return this.oldPrice;
	}

    /**
     * 设置原标准价
     */
	public ChangePriceLog setOldPrice(Double oldPrice) {
		this.oldPrice = oldPrice;
		return this;
	}

	/**
	 * 获取变后标准价
	 */
	public Double getPrice() {
		return this.price;
	}

    /**
     * 设置变后标准价
     */
	public ChangePriceLog setPrice(Double price) {
		this.price = price;
		return this;
	}

	/**
	 * 获取原会员价
	 */
	public Double getOldVipPrice() {
		return this.oldVipPrice;
	}

    /**
     * 设置原会员价
     */
	public ChangePriceLog setOldVipPrice(Double oldVipPrice) {
		this.oldVipPrice = oldVipPrice;
		return this;
	}

	/**
	 * 获取变后会员价
	 */
	public Double getVipPrice() {
		return this.vipPrice;
	}

    /**
     * 设置变后会员价
     */
	public ChangePriceLog setVipPrice(Double vipPrice) {
		this.vipPrice = vipPrice;
		return this;
	}

	/**
	 * 获取变价原因
	 */
	public String getReason() {
		return this.reason;
	}

    /**
     * 设置变价原因
     */
	public ChangePriceLog setReason(String reason) {
		this.reason = reason;
		return this;
	}

	/**
	 * 获取生效日期
	 */
	public Date getEffectiveTime() {
		return this.effectiveTime;
	}

    /**
     * 设置生效日期
     */
	public ChangePriceLog setEffectiveTime(Date effectiveTime) {
		this.effectiveTime = effectiveTime;
		return this;
	}

	/**
	 * 获取是否默认
	 */
	public String getOperatorName() {
		return this.operatorName;
	}

    /**
     * 设置是否默认
     */
	public ChangePriceLog setOperatorName(String operatorName) {
		this.operatorName = operatorName;
		return this;
	}

	/**
	 * 获取操作时间
	 */
	public Date getOperateTime() {
		return this.operateTime;
	}

    /**
     * 设置操作时间
     */
	public ChangePriceLog setOperateTime(Date operateTime) {
		this.operateTime = operateTime;
		return this;
	}

}
